﻿using System;
using System.Web.Mvc;
using System.Web.Routing;
using Diploma.Models;

namespace DiplomaWeb.Core
{
    public class DiplomaControllerFactory : DefaultControllerFactory
    {
        protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
        {
            if (controllerType == null)
                return null;

            return Activator.CreateInstance(controllerType, DataManager.Instance) as IController;
        }
    }
}